<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="jquery.min.js"></script>
</head>
<body>
<script type="text/javascript">

    $(function () {

        $("#post").click(function () {
            console.log("post")
            $.post("/ajax",function(result){
                console.log(result)
            });
        });
        $("#get").click(function () {
            console.log("get")
            $.get("/ajax",function(result){
                console.log(result)
            });
        });
        //绑定一个点击事件
        $("#ajax").click(function(){

            console.log("click");

            $.ajax({
                url:"../hello/ajax",
                success:function(result){
                    console.log(result);
                }
            });


        });

    })

</script>
<button id="ajax">发送</button>
<button id="post">发送post</button>
<button id="get">发送get</button>

</body>
</html>
